package com.tianji.remark.service.impl;

import com.tianji.remark.domain.dto.LikeRecordFormDTO;
import com.tianji.remark.domain.po.LikedRecord;
import com.tianji.remark.mapper.LikedRecordMapper;
import com.tianji.remark.service.ILikedRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 点赞记录表 服务实现类
 * </p>
 *
 * @author jiege
 * @since 2024-06-28
 */
@Service
public class LikedRecordServiceImpl extends ServiceImpl<LikedRecordMapper, LikedRecord> implements ILikedRecordService {

    @Override
    public void addLikeRecord(LikeRecordFormDTO likeRecordFormDTO) {
        //1基于前端的参数，判断是执行点赞还是取消点赞
/*
  boolean success =likeRecordFormDTO.getLiked() ? like(likeRecordFormDTO) : unlike(likeRecordFormDTO);
*/

        //2判断是否执行成功，如果失败。就直接结束

        //3如果执行成功，就统计点赞数量


        //发送mq通知
    }
}
